#!/bin/bash
# usage:
dir_bin=$(dirname ${BASH_SOURCE})
#dir_base=$(dirname ${dir_bin})
dir_base=${dir_bin}

dir_html=${dir_base}/html

mkdir -p ${dir_html}
f_html="${dir_html}/$(date +%Y%m%d_%H%M%S).html"
wget -O ${f_html} http://210.75.213.188/shh/portal/bjjs/index.aspx

# extract and copy to website file
sh $dir_bin/extract.sh > $dir_base/results.txt
cp $dir_base/results.txt /home/disk1/website1/house.html
cp $dir_base/results.txt /opt/lampp/htdocs/house.html